package com.bbzn.device.client.service.impl;

import com.bbzn.device.client.dao.group.GroupLinkMapper;
import com.bbzn.device.client.dataobject.GroupLink;
import com.bbzn.device.client.dto.group.GroupLinkDTO;
import com.bbzn.device.client.dto.group.LinkGroupDTO;
import com.bbzn.device.client.service.GroupLinkService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class GroupLinkServiceImpl implements GroupLinkService {

    @Resource
    private GroupLinkMapper groupLinkMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return groupLinkMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(GroupLink record) {
        return groupLinkMapper.insert(record);
    }

    @Override
    public int insertOrUpdate(GroupLink record) {
        return groupLinkMapper.insertOrUpdate(record);
    }

    @Override
    public int insertOrUpdateSelective(GroupLink record) {
        return groupLinkMapper.insertOrUpdateSelective(record);
    }

    @Override
    public int insertSelective(GroupLink record) {
        return groupLinkMapper.insertSelective(record);
    }

    @Override
    public GroupLink selectByPrimaryKey(Long id) {
        return groupLinkMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(GroupLink record) {
        return groupLinkMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(GroupLink record) {
        return groupLinkMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<GroupLink> findByAll(GroupLink groupLink) {
        return groupLinkMapper.findByAll(groupLink);
    }

    @Override
    public int updateBatch(List<GroupLink> list) {
        return groupLinkMapper.updateBatch(list);
    }

    @Override
    public int updateBatchSelective(List<GroupLink> list) {
        return groupLinkMapper.updateBatchSelective(list);
    }

    @Override
    public int batchInsert(List<GroupLink> list) {
        return groupLinkMapper.batchInsert(list);
    }

    @Override
    public List<GroupLink> queryByAll(GroupLinkDTO group) {
        return groupLinkMapper.queryByAll(group);
    }

    @Override
    public int batchDel(List<Long> list) {
        return groupLinkMapper.batchDel(list);
    }

    @Override
    public List<LinkGroupDTO> getLinkGroup(List<Long> ids, Long groupId) throws Exception {
        return groupLinkMapper.getLinkGroup(ids, groupId);
    }
}

